package loan.calc.datasource;

import org.springframework.jdbc.core.JdbcTemplate;

import javax.sql.DataSource;
import java.util.Objects;

/**
 * @author v_ECD963
 */
public class DynamicJdbcTemplate extends JdbcTemplate {

    @Override
    public DataSource getDataSource() {
        return ((DynamicDataSource) Objects.requireNonNull(super.getDataSource()))
                .getAcuallyDataSource();
    }
}
